import React from 'react'
import { BrowserRouter, Routes, Route, Navigate, NavLink } from "react-router-dom";
import Home from "../components/home";
import My from "../components/my";

export default function index() {
  return (
    <BrowserRouter>
      {/* 测试 */}
      <NavLink to="/home">Home</NavLink> | <NavLink to="/my">My</NavLink>
      <Routes>
        <Route path="/" element={<Navigate to="/home"></Navigate>}></Route>
        <Route path="/home" element={<Home />}></Route>
        <Route path="/my" element={<My />}></Route>
      </Routes>
    </BrowserRouter>
  )
}
